  <?php foreach($midias as $midia): ?>
  <div class="col-md-4">
	<div class="thumbnail">
	  <?php echo $this->Html->image($midia['Midia']['nome'], array('style' => 'width:200px;height:200px')) ?>
		<?php if($midia['Midia']['ic_capa']): ?>
		<span class="label label-info"><i class="fa fa-check"></i> Capa</span>
		<?php endif ?>
		<br/>
		<div class="btn-group">
	  <?php if(!$midia['Midia']['ic_capa']): ?>
		<button class="btn btn-default" onclick="definirCapa(<?php echo $midia['Midia']['id'] ?>)">Definir como capa</button>
	  <?php endif ?>
	  <button class="btn btn-default" onclick="apagar(<?php echo $midia['Midia']['id'] ?>)">Excluir</button>
	</div></div>
	</div>
  <?php endforeach ?>